Optimised main method to run each algorithm for a set time and output to
results to file