added missing err_exit function (thanks, @Sepero!)