Add proper printing and file output for solution path.