ENH: updated timeout to raise a timeout error