Better error messages for invalid arguments to loadPatches