check for canRead and isFile before processing a path
throw exceptions properly