Modified trace to base output filename on input filename.
COMPLETED M175, THIS IS STUPID