Exit on GenEvent call, move stream to its own module