GetEmitOutput function and testfiles

remove getSoruceFile() call, the result is already a sourceFile