fix compareTime call, add log messages