im curious as to what conditions would make fprintf not work

i have a valid file ptr, i have opened the file with fopen and "w"
and the code before and after my fprintf statement works
it just wont write to the file (the file remains empty)

the file in question is just a command line argument that gets open so the permissions are fine as well

any thoughts