Wait for IMEX return code before proceeding