minor code cleanup
quick abort if stream is unreachable
more debug information