fixing menu_length
getting max filelength