Modified check for existance of database in remove database action