build parallel
add error handling for disconnection
stop thread at worker destructor
add logging feature
writing logging messages
create app_state class for state common logging