GetEmitOutput function and testfiles

nit: filename not fileName