adding cleanup code in proc.c to handle file system