I think I could make the loading function return a boolean and evaluate it here.