added close connections to DB
add syso to debug
fix closing db connection 2