use stop instead of shutdown server and use flexi-streams for binary streams