Removing calls to IO#lines (deprecated), removing print statement