Changed loading of YAML file so that it can be called from cron