Handle io exception for logger