introduced try/catch to handle sqlite connection