phonegap: replace assert by message