in reply to system call not working

The program will try to create predator.txt in the current working directory. Is that directory what you think it is? Does the program have permission to write in that directory?

Try using -f/tmp/predator.txt, that is, a full path name and using a directory that is expected to be writable by the program.

Abigail