Logging on top-level lib functions