Merges phases into single file