Better error messages for qc amount calculate script