remove stupid fd to FILE*

It's better to use fd instead of FILE*