add manual message loop
add basic exception handling