Fix pom.xml and add exception messages