added some more logging
updated to have own db connection for testing