How about the following idea:
- Create a priority queue
- Iterate through each file f
- enqueue the pair (nextNumberIn(f), f) using the first value as priority key
- While queue not empty
- dequeue head (m, f) of queue
- output m
- if f not depleted
- enqueue (nextNumberIn(f), f)
Since adding elements to a priority queue can be done in logarithmic time, item 2 is O(N × log N). Since (almost all) iterations of the while loop adds an element, the whole while-loop is O(M × log N) where M is the total number of numbers to sort.
Assuming all files have a non-empty sequence of numbers, we have M > N and thus the whole algorithm should be O(M × log N).