perharps check if console exists before setting name.