Add query logging
simplify usage of Promises in query
v0.1.2