Maybe do error logging slightly better for exceptions