Fix use-after-close on fds

Signed-off-by: Chris Mason <clm@fb.com>
diff --git a/simoop.c b/simoop.c
index dbb7794..c984168 100644
--- a/simoop.c
+++ b/simoop.c
@@ -1326,7 +1326,6 @@
 		     write_bytes * 4);
 
 	XXH32_digest(xxhash_state);
-	close(fd);
 
 	/* make some dirty inodes */
 	if (!append_mode) {
@@ -1336,6 +1335,7 @@
 		/* delete some files */
 		ftruncate(fd, 0);
 	}
+	close(fd);
 }
 
 /* make all the worker files under a main path */