Kosynka. Error handling in stio function