Added method to print flow object to file