Split file output into two functions so that one could take a file object and the other will create one.
Split file output into two functions so that one could take a file object and the other will create one.

hadmack/pyoscope,niun/pyoscope,pklaus/pyoscope