edgar.c: file i/o