Added auto_reconnect and db log