checking errors, adding timeout