capturing stderr during collection