Refactor BitmapStreamConverter for better error output