ebuild lib: fixed possible runtime IO exception