Fixing timestamp bug

When something goes wrong with the output, still need the timestamp.