Adding some error handling to the youtube plugin