Use error_msg() instead of warn() and warn_errno()