Fixed creating spectrum with metadata, and storing metadata in fileHandler