split terminal into separate file