correctly initialize sOrigCWD before using it