wait for error and run