global FILE *logfile variable and it's friends