durationWrite calculation missing