Fix sandboxed console.log
Fix tests to wait for async functions to complete