Fix firmware upload (thanks sparkyb!) and hook up log handler