modified database attached check to use _dbfile instead of _cursor