Core/Phases: some error checking at db loading
- implement .debug phase command