Fixed a bug with logging the sample name.