improvement to be sure original pom files are returned in case of failure