Redone file.write and file.close