Use clock in log reader handler and fix some warnings