First change PWD then do (re)boot detection