serializationSavingObjs 2 file try with resources

Try with resources