File operations using POSIX c