updated so can set absolute output directory