replace all fprintf(stderr,... calls with calls to LOG_MSG