Fixed is_file_exists throwing file not found errors on testing

The problem was that is_file_exists() came before sqlite3_open() that created the file we are checking for. A simple reordering of the statements fixed the issue.