replace working directory with getcwd