On enter and exit cwd hooks