fixed tab and new line characters in output file