added functionality for merging optimized files