Fix serializer file modes.