fixed filename issue and detect crontab