correct parameter order for take
add catch' and buffer-stream -> buffered-stream