updated the benchmark and added better handling for errors when opening files