Logging. Retry on timeout. Misc stuff