It's most likely due to not passing a valid const char* to void perror(const char *s), which makes the file name in <filename>: No such file or directory
output as garbage/non printable characters.
The perror() function shall map the error number accessed through the symbol errno to a language-dependent error message, which shall be written to the standard error stream as follows:
First (if s is not a null pointer and the character pointed to by s is not the null byte), the string pointed to by s followed by a colon and a .
Then an error message string followed by a .