[monitor] improved file monitor