[PD] return error values for writesf~ or readsf~