updated requesttofile.c with header fields