Unfortunately I don't think the script was designed to handle upwards of 14000 messages. It keeps on receiving the errors. I will sync with Nokia suite and remove messages one by one from there as I only want to remove certain messages.