Refactor task import

I'm just DRYing the error handling for now