merge global into main file