Adjust EDR calculation. Double check algo. Refine output with multiple files.