More robust binary handling + redirection of STDOUT.