New module output.py has been added. Accordingly, small changes in main for the purpose of coding this.