make StreamHandler non-block