more robust console.clear