Fixed possible buffer overflows. Moved config_init past checking if config file exists.