Added check for .db file extension