checking file write