Add file reading and writing support to dns_map
Fix compiler warnings