catching errors where no file exists