Added code to handle read-only pom.xml files. Also corrected minor logical errors in the program