Added log on failure of renaming temporary file.