Added logging to TG50 and rectified some errors in TG40.