Fix: use config object for check_conf instead of itself
add new funcs is_sql_activated
Use of mysql objects instead of using pkey value
Offset thread now runs only if SQL is activated in the config file