Add support for saving metadata on queries.

I feel like having the metadata file act as an error log is overloading it too much and not really intuitive. I think it's a lot simpler if there's always a 1:1 relationship between the metadata file and the data file. I don't want consuming applications to have to parse the metadata file, then handle the case where the metadata file says there's no data because of an error. The logger is logging the error and I think that's sufficient for our purposes.