add functions to write/read dbfile header in dbfile.c