use system calls to read/write the database file