minor changes, but broken location printing in output file