Adapt build for gradle/client libs
Improved logging