fix: bug in main.js introduced during the last commit
fix: version number in VERSION file
make the code more robust by testing returned values + more explicit error messages + fix curl errors mentioned in issue #2