First version works, but the code is dirty due to an exit somewhere in the youtube-dl code