Try to query a table from the expected schema or just retrieve the tables list. If you get an error then it is not an Sqlite DB. You will not get an error retrieving the table list if the file you opened is non-existent or zero sized. If a user mistypes the name of an existing file then Sqlite will just create it, which is both useful and annoying.