(feat) output to file [fixes \#1]