Updated error loggin in cron