NEW error reporting in main()