Generate output file only when there is a successful compilation.