(refactor): Fixed the way logging is done