Added logging for end of track