files.c working 100%