Catching error when someone passes an invalid path