Add error checking and a couple bug fixes

Remove old include file

Default to debug on bad priority string