The hardcoded indexes on info array are relative to path on the config file, which is variable. maybe using info[-5] instead of info[4] is better. Same for the next lines.