adding printouts around opening of db connection.