cron_json.sh - add error handling and source env