More changes to beam map routine; write out files