Printing failed routes

Improved printing to file, also added printing of failed routes (paths
that are generated in search of the solution but do not yield a
solution)