Added a break to the exit traps.
Added cleanup after terminating the script.
Fix bug that broke some transcodes.