Adding Back Accidentally Deleted Function

Accidentally removed print_to_file. Now it’s back.