Fix missing spell.

Faild ->
Failed
Add call fclose() function in else clause.

Because when daemon() function is failure, should be closed properly file stream.