Update phdfs.c

Important changes to