fix for possiblity of writing over file...