fix for write_file (dos2unix)