fixed some bugs
add test for io base classes