Handle errors

Handles a greater number of errors and keeps going using a shared helper method, also logs more information about what went wrong.