dump error when an file can't be created/written