Logic in writing and thinking