fix working dir for process function