regardingRegarding these kinds of statements:
fprintf(stderr, "\n%s is not a valid file or permission denied\n", src);
whenWhen the error indication is from a C library function, we should call
perror( "my error message" );
as that outputsThat will output to stderr, both your error message AND the text reason the system thinks the error occurred.