begin file io and main menu