loads and merges files