Improved console.log support during tests