added logging to program main()