More debug logging
Raise error when guiid cannot be found. Fixes #1.