fix for cron job, better logging