Fix IO error and POM compatibility