Added some logs for debugging.