better error handling
experiment with cordova-osx