put call to AiChooser in a more sensible place for I/O