added more logging to sample