Replaced direct console output with logging in core