whitespace cleanup
refactoring to add suffix argument where necessary for write_temp_file