Moved printing in main()