C check current work directory
https://stackoverflow.com/questions/298510/how-to-get-the-current-directory-in-a-c-program
char cwd[1024];
if (getcwd(cwd, sizeof(cwd)) != NULL)
fprintf(stdout, "Current working dir: %s\n", cwd);
else
perror("getcwd() error");