wxIMPLEMENT_DYNAMIC_CLASS requires a default constructor (no filename). Check if m_outfile is initialized with a valid filename before using it.