Fixed bug with attach_file on windows