catch filesystem errors