ECL-289 Made creation of tempFile more robust.