Fixed errors
Possibly fixed sqlite logging error