added error checking for AndroidManifest.xml