make sure path is not empty