diff --git a/src/distributed_io.c b/src/distributed_io.c
index 8a5a21f4fc555d4d27b33b34853669f2010b5e22..355fdb05ac33b40ffdb0c2b9630b37a2e4b136c5 100644
--- a/src/distributed_io.c
+++ b/src/distributed_io.c
@@ -391,6 +391,7 @@ void write_output_distributed(struct engine* e,
                      swift_type_count);
   io_write_attribute_i(h_grp, "NumFilesPerSnapshot", numFiles);
   io_write_attribute_i(h_grp, "ThisFile", mpi_rank);
+  io_write_attribute_s(h_grp, "OutputType", "Snapshot");
 
   /* Close header */
   H5Gclose(h_grp);
diff --git a/src/line_of_sight.c b/src/line_of_sight.c
index f5d2557bc2a942e6d8413883f3f8bc09206e29a0..a4c4aa9a8c5b624ac7b9c3d824a828952ab4ad1c 100644
--- a/src/line_of_sight.c
+++ b/src/line_of_sight.c
@@ -488,17 +488,19 @@ void write_hdf5_header(hid_t h_file, const struct engine *e,
                          e->s->dim[2] * factor_length};
 
   io_write_attribute(h_grp, "BoxSize", DOUBLE, dim, 3);
-  io_write_attribute(h_grp, "Time", DOUBLE, &dblTime, 1);
-  const int dimension = (int)hydro_dimension;
-  io_write_attribute(h_grp, "Dimension", INT, &dimension, 1);
-  io_write_attribute(h_grp, "Redshift", DOUBLE, &e->cosmology->z, 1);
-  io_write_attribute(h_grp, "Scale-factor", DOUBLE, &e->cosmology->a, 1);
+  io_write_attribute_d(h_grp, "Time", dblTime);
+  io_write_attribute_d(h_grp, "Dimension", (int)hydro_dimension);
+  io_write_attribute_d(h_grp, "Redshift", e->cosmology->z);
+  io_write_attribute_d(h_grp, "Scale-factor", e->cosmology->a);
   io_write_attribute_s(h_grp, "Code", "SWIFT");
   io_write_attribute_s(h_grp, "RunName", e->run_name);
-  const int num_files_per_snapshot = 1;
-  io_write_attribute(h_grp, "NumFilesPerSnapshot", INT, &num_files_per_snapshot,
-                     1);
-  io_write_attribute_s(h_grp, "OutputType", "LineOfSight");
+
+  /* Store the time at which the snapshot was written */
+  time_t tm = time(NULL);
+  struct tm *timeinfo = localtime(&tm);
+  char snapshot_date[64];
+  strftime(snapshot_date, 64, "%T %F %Z", timeinfo);
+  io_write_attribute_s(h_grp, "Snapshot date", snapshot_date);
 
   /* GADGET-2 legacy values */
   /* Number of particles of each type */
@@ -516,13 +518,9 @@ void write_hdf5_header(hid_t h_file, const struct engine *e,
                      swift_type_count);
   io_write_attribute(h_grp, "NumPart_Total_HighWord", UINT,
                      numParticlesHighWord, swift_type_count);
-
-  /* Store the time at which the snapshot was written */
-  time_t tm = time(NULL);
-  struct tm *timeinfo = localtime(&tm);
-  char snapshot_date[64];
-  strftime(snapshot_date, 64, "%T %F %Z", timeinfo);
-  io_write_attribute_s(h_grp, "Snapshot date", snapshot_date);
+  io_write_attribute_i(h_grp, "NumFilesPerSnapshot", 1);
+  io_write_attribute_i(h_grp, "ThisFile", 0);
+  io_write_attribute_s(h_grp, "OutputType", "LineOfSight");
 
   /* Close group */
   H5Gclose(h_grp);
diff --git a/src/parallel_io.c b/src/parallel_io.c
index 5f26423800357ecd8d5a8c81a94dfb047ff43e13..be820e2ecd3434f7d41635f8b0397ff5a1ef368c 100644
--- a/src/parallel_io.c
+++ b/src/parallel_io.c
@@ -1139,6 +1139,7 @@ void prepare_file(struct engine* e, const char* fileName,
                      swift_type_count);
   io_write_attribute(h_grp, "NumFilesPerSnapshot", INT, &numFiles, 1);
   io_write_attribute_i(h_grp, "ThisFile", 0);
+  io_write_attribute_s(h_grp, "OutputType", "Snapshot");
 
   /* Close header */
   H5Gclose(h_grp);
diff --git a/src/serial_io.c b/src/serial_io.c
index 58b8f284515086866c9dd4da4f0879800d5ee254..478058299a7b777b1351adcf64ddbf96b7bfb2bc 100644
--- a/src/serial_io.c
+++ b/src/serial_io.c
@@ -1006,6 +1006,7 @@ void write_output_serial(struct engine* e,
                        swift_type_count);
     io_write_attribute(h_grp, "NumFilesPerSnapshot", INT, &numFiles, 1);
     io_write_attribute_i(h_grp, "ThisFile", 0);
+    io_write_attribute_s(h_grp, "OutputType", "Snapshot");
 
     /* Close header */
     H5Gclose(h_grp);
diff --git a/src/single_io.c b/src/single_io.c
index 2cc44cc59ad376b483bae87ebe922989ac1b9c8d..d25da91279e5f89ed456c9519d913a39ff05596a 100644
--- a/src/single_io.c
+++ b/src/single_io.c
@@ -851,6 +851,7 @@ void write_output_single(struct engine* e,
                      swift_type_count);
   io_write_attribute(h_grp, "NumFilesPerSnapshot", INT, &numFiles, 1);
   io_write_attribute_i(h_grp, "ThisFile", 0);
+  io_write_attribute_s(h_grp, "OutputType", "Snapshot");
 
   /* Close header */
   H5Gclose(h_grp);