Optimizing writing process