Refined updating / creating. File updating now uses array_merge().