fixed unhandled error state in the function, which searches for external
resources