improvment of exceptions inside once