using script command instead of standard io redirection because some stderr was being dropped