CHanged write.htmlname to index.html as required by phonegap