Implmented file I/O on posix