added some file io infrastructure.....