Move stat calls earlyer in the cron job