Added check if console exists