Added functions for writing analyzed data to disk