modified error message for bad paths