Replace printf(...) by fprintf(stderr, ...)

Rebased on last master