fix PATH and pwd when downloading