[API] writing final output started