Learning to write: Error analysis applied