templet with defined freopen and debug