added timeout with error reporting