IO validation library for C