add error catching for source validation