Added check to see if database is being used.