Check for exec to be finished to change into api dir