commiting ToFile class with input & output