more verbose error messages + constify param