Optimized writing

Change-Id: Ic6069e45372a151941bfdb98fb394fe7d00d31ea