improve menu file reading