improve for path is None