added output.txt and fixed counter issue -MM