Some fixes. Only output file if it's different than current translation unit