use fatal() instead of err()