Fix out of place logging