I have a perl code where I access multiple txt files and produce output for them. 
While I run the code, the output lines on the console are overwritten.

```
2015-04-21:12-04-54|getFilesInInputDir|  ********** name : PEPORT **********
PEPORT4-21:12-04-54|readNFormOutputFile|  name :
PEPORT" is : -04-54|readNFormOutputFile| Frequency for name "

```

Please note, that the second and third line it should have been like 

```
2015-04-21:12-04-54|readNFormOutputFile| name : PEPORT
2015-04-21:12-04-54|readNFormOutputFile| Frequency for name "PEPORT"

```

Also, after this the code stops processing my files. The code seems fine. May I know what may be the possible cause for this.

Thanks.