Added better SQL logger