$config[paths] throws exception is if not an array
error on line80 corrected