Save Object to File. Generic Implementation