Added prompt variable.
pwSearch was not closing db connection.