Remove unsafe code references
Add IOException handling when creating DebugView