config logging for lib
fix query test
catch 'no metadata' condition