get path, and cleanup