better debugging + disconnect db to avoid db locks