Add benchmarking and writing result to file

Add config elements to write benchmark to file, and write functions for same