switch to the right dir when copying output