Console works after refactoring