handling invalid path