Moved logging messages into where teleport happens.