add comment for path_write method