chdir
refactoring for crontab