final Map<String, Tag> newTopLevelMap = new HashMap<String, Tag>(1);
newTopLevelMap.put("Data", newDataTag);
final CompoundTag newTopLevelTag = new CompoundTag("", newTopLevelMap);
final NBTOutputStream output = new NBTOutputStream(new FileOutputStream(level));
output.writeTag(newTopLevelTag);
output.close();
} catch (final ClassCastException ex) {
throw new IOException("Invalid level format.");
} catch (final NullPointerException ex) {
throw new IOException("Invalid level format.");