handling filesystem errors