add debug mode, better error reporting, custom starting category subpage