add calfflac.in
add fread and fwrite