More improvements on the notebook management when there are text files.