Fix crash with iolog

Signed-off-by: Jens Axboe <jens.axboe@oracle.com>
diff --git a/log.c b/log.c
index 790d3a1..8f92e93 100644
--- a/log.c
+++ b/log.c
@@ -40,6 +40,13 @@
 	if (!td->o.write_iolog_file)
 		return;
 
+
+	/*
+	 * this happens on the pre-open/close done before the job starts
+	 */
+	if (!td->iolog_f)
+		return;
+
 	fprintf(td->iolog_f, "%s %s\n", f->file_name, act[what]);
 }