Improved menu file selection in LWP function