Moved warning message API to config, added file/dir checks for state fil...

...e, updated cron script example with argv check