Starting with txindex option produces a bug continually printing "y".

```
sudo apt-add-repository ppa:bitcoin/bitcoin
sudo apt-get update
bitcoind -daemon -txindex=1 -server=1 &
root@btc:~# Bitcoin server starting
: You need to rebuild the database using -reindex to change -txindex.

Do you want to rebuild the block database now?
yes
y
y
y
y
y
```

FILE *file = fopen(path.string().c_str(), "rb");
        if (file) {
            LogPrintf("Importing blocks file %s...\n", path.string());
            LoadExternalBlockFile(chainparams, file);
        } else {
            LogPrintf("Warning: Could not open blocks file %s\n", path.string());
        }
    }
    
    CValidationState state;
    if (!ActivateBestChain(state, chainparams)) {
        LogPrintf("Failed to connect best block");
        StartShutdown();
    }
    if (GetBoolArg("-stopafterblockimport", DEFAULT_STOPAFTERBLOCKIMPORT)) {
        LogPrintf("Stopping after block import\n");
        StartShutdown();
    }
}
/** Sanity checks
 *  Ensure that Bitcoin is running in a usable environment with all
 *  necessary library support.
 */
bool InitSanityCheck(void)