Print sample id instead of the object during error