Use fail instead of raise to signal exception