Added database open/close messages for debugging.