check for cwd() failures