Add output to file

read from file feature has some problems so it delay