errmsg() {
# Usage: errmsg <text>
# prints "Error in <functionname>: <text>" to stderr
printf "Error in %s: %s\n" "${FUNCNAME[1]}" "$1" >&2
}