Made config file parsing more robust.