Writes hex representation of p value to file to maintain precision