JBIDE-13370 Cannot read temporary file

Synchronized blocks that read and write temporary files.
Put stack trace into log with more details about the failing object.