Final debugging

Just before out put to text file change