output buffer is not always open during debugging
Added fixes for more errors