Now the results are only printed in the console, it would be very nice if the results can be written to a file.