moved io related code to separate directory