Use shared error handler in S3.scala