added checking of the result returned by file:write_file.
added checking of the result returned by file:write_file.


tdb/wrangler,prowessproject/wrangler,arcusfelis/wrangler,andrzejsliwa/wrangler,bsmr-erlang/wrangler,arcusfelis/wrangler