raise error when file does not exist or is not readable