Phonegap script modification for device debugging