Finished handle_sys_open and handle_sys_write