Trying to rationalize the treatment of the different files.
 Refactoring
 New version of PopupMenu that includes callbacks for text files (.log, .out)