Function logic done
Add file output