Check if PWD env was set before reset