Added ErrorAction.
Refactored the basic app.
minor enhancement of debugger.