Checking errors in android