moidfy sendWindow class to make it can be used by other frame
add mode control log frame