Geodesic mode instability driven by electron and ion fluxes during neutral beam injection in tokamaks