Catch system output and fix download bug