Catch file write Exception