Index: trunk/src/com/drew/metadata/tiff/DirectoryTiffHandler.java
===================================================================
--- trunk/src/com/drew/metadata/tiff/DirectoryTiffHandler.java	(revision 10862)
+++ trunk/src/com/drew/metadata/tiff/DirectoryTiffHandler.java	(revision 13061)
@@ -1,4 +1,4 @@
 /*
- * Copyright 2002-2016 Drew Noakes
+ * Copyright 2002-2017 Drew Noakes
  *
  *    Licensed under the Apache License, Version 2.0 (the "License");
@@ -25,5 +25,7 @@
 import com.drew.lang.annotations.NotNull;
 import com.drew.metadata.Directory;
+import com.drew.metadata.ErrorDirectory;
 import com.drew.metadata.Metadata;
+import com.drew.metadata.StringValue;
 
 import java.util.Stack;
@@ -41,9 +43,20 @@
     protected final Metadata _metadata;
 
-    protected DirectoryTiffHandler(Metadata metadata, Class<? extends Directory> initialDirectoryClass)
+    protected DirectoryTiffHandler(Metadata metadata)
     {
         _metadata = metadata;
+    }
+
+    public void endingIFD()
+    {
+        _currentDirectory = _directoryStack.empty() ? null : _directoryStack.pop();
+    }
+
+    protected void pushDirectory(@NotNull Class<? extends Directory> directoryClass)
+    {
+        Directory newDirectory = null;
+
         try {
-            _currentDirectory = initialDirectoryClass.newInstance();
+            newDirectory = directoryClass.newInstance();
         } catch (InstantiationException e) {
             throw new RuntimeException(e);
@@ -51,35 +64,38 @@
             throw new RuntimeException(e);
         }
-        _metadata.addDirectory(_currentDirectory);
-    }
-
-    public void endingIFD()
-    {
-        _currentDirectory = _directoryStack.empty() ? null : _directoryStack.pop();
-    }
-
-    protected void pushDirectory(@NotNull Class<? extends Directory> directoryClass)
-    {
-        _directoryStack.push(_currentDirectory);
-        try {
-            Directory newDirectory = directoryClass.newInstance();
-            newDirectory.setParent(_currentDirectory);
+
+        if (newDirectory != null)
+        {
+            // If this is the first directory, don't add to the stack
+            if (_currentDirectory != null)
+            {
+                _directoryStack.push(_currentDirectory);
+                newDirectory.setParent(_currentDirectory);
+            }
             _currentDirectory = newDirectory;
-        } catch (InstantiationException e) {
-            throw new RuntimeException(e);
-        } catch (IllegalAccessException e) {
-            throw new RuntimeException(e);
+            _metadata.addDirectory(_currentDirectory);
         }
-        _metadata.addDirectory(_currentDirectory);
     }
 
     public void warn(@NotNull String message)
     {
-        _currentDirectory.addError(message);
+        getCurrentOrErrorDirectory().addError(message);
     }
 
     public void error(@NotNull String message)
     {
-        _currentDirectory.addError(message);
+        getCurrentOrErrorDirectory().addError(message);
+    }
+
+    @NotNull
+    private Directory getCurrentOrErrorDirectory()
+    {
+        if (_currentDirectory != null)
+            return _currentDirectory;
+        ErrorDirectory error = _metadata.getFirstDirectoryOfType(ErrorDirectory.class);
+        if (error != null)
+            return error;
+        pushDirectory(ErrorDirectory.class);
+        return _currentDirectory;
     }
 
@@ -89,7 +105,7 @@
     }
 
-    public void setString(int tagId, @NotNull String string)
-    {
-        _currentDirectory.setString(tagId, string);
+    public void setString(int tagId, @NotNull StringValue string)
+    {
+        _currentDirectory.setStringValue(tagId, string);
     }
 
Index: trunk/src/com/drew/metadata/tiff/package-info.java
===================================================================
--- trunk/src/com/drew/metadata/tiff/package-info.java	(revision 13061)
+++ trunk/src/com/drew/metadata/tiff/package-info.java	(revision 13061)
@@ -0,0 +1,6 @@
+/**
+ * Contains classes for the extraction and modelling of TIFF file metadata.
+ *
+ * @since 2.7.0
+ */
+package com.drew.metadata.tiff;
Index: trunk/src/com/drew/metadata/tiff/package.html
===================================================================
--- trunk/src/com/drew/metadata/tiff/package.html	(revision 10862)
+++ 	(revision )
@@ -1,34 +1,0 @@
-<!--
-  ~ Copyright 2002-2016 Drew Noakes
-  ~
-  ~    Licensed under the Apache License, Version 2.0 (the "License");
-  ~    you may not use this file except in compliance with the License.
-  ~    You may obtain a copy of the License at
-  ~
-  ~        http://www.apache.org/licenses/LICENSE-2.0
-  ~
-  ~    Unless required by applicable law or agreed to in writing, software
-  ~    distributed under the License is distributed on an "AS IS" BASIS,
-  ~    WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-  ~    See the License for the specific language governing permissions and
-  ~    limitations under the License.
-  ~
-  ~ More information about this project is available at:
-  ~
-  ~    https://drewnoakes.com/code/exif/
-  ~    https://github.com/drewnoakes/metadata-extractor
-  -->
-
-<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2 Final//EN">
-<html>
-<head>
-</head>
-<body bgcolor="white">
-
-Contains classes for the extraction and modelling of TIFF file metadata.
-
-<!-- Put @see and @since tags down here. -->
-@since 2.7.0
-
-</body>
-</html>
