Fixed consoleOrRethrow implementation