new way to write files with linux, since the previous one wasn't working on some distro...