Perfornimg  fclose(fp) only if(MESSAGE_LEVEL > NONE && fp != NULL)
Perfornimg  fclose(fp) only if(MESSAGE_LEVEL > NONE && fp != NULL). Perfroming fprintf() only if(MESSAGE_LEVEL > NONE)