Log printed errors duringcron runs automatically to reduce repetetive code