added error handling for missing opencv