Added version check to the build promise
Added tests for version checking