Fixed config file error.
Added directory check on line 155
fixing errors
fixed includes errors.
More fixes