Correct dialog logic and dirdialog setup
add FD monitoring support