Don't fclose on NULL filein.

Signed-off-by: Vladimir Cernov <gg.kaspersky@gmail.com>