factor out error handlers into separate file
initial stab at dataset handler