fix a bug on saving the output dir. cause: object property in js remains unchanged if the object has its proterty changed when it is passed into a callback function.