lcOrgDir = SYS(5)+SYS(2003)Whenever you've got code that is sensitive to the current directory, just simply make sure you execute:
SET DEFAULT TO (m.lcOrgDir)The silent change of current workarea had me puzzled for a while when I first encountered it. Finally figured it out when I just happened to query the current working directory in the debugger.