Temporary detailed logging for switchTo() function