Fixed exceptions, added timeout