add the code about changing working dir