remove debug output; re-add exception throwing