Add some log messages and fix timing