in reply to printf in if-statement

Then why don't you check for errors! Starting with open.

(Too slow! See Re: printf in if-statement)