Changed to create a character compliant temp copy of original file before processing