writes the xrayfile and add all the ints in the file to the xray list