Logging refactor, interrupt and abort flags added.