added pbsql to execute sql querys and logging it