My first suggestion is that you stop #including NXCDefs.h. The compiler does this automatically for you so there is no reason to put this line in your own code anymore. It was needed a long time ago so old sample code may still do this.
My second suggestion is that you are perhaps not actually running the latest enhanced NBC/NXC firmware on your NXT if all you see is the File Error! message without a number also shown on the screen. Recent releases of the enhanced firmware have added an error code output to this message so that you can tell what kind of problem has occurred. You can get version 1.31 of the enhanced NBC/NXC firmware via links on the BricxCC page or in the latest test release zip at http://bricxcc.sourceforge.net/test_releases/
. Check the NXT Versions screen under Settings on your NXT to see what version you are actually running. If it doesn't say NBC/NXC on that page then you are running the standard firmware.
My third suggestion is that in a trivial program like this the most likely cause for a File Error message is trying to run 2.0 code on a 1.0 firmware or code that requires the enhanced firmware on the standard firmware or code compiled with a version of NBC that doesn't know anything about the 2.0 firmware on a 2.0 firmware. So it would be good to verify that you are running the latest NBC for your platform and that you are passing -EF if you have the enhanced firmware on your brick but not using that switch on the command line if you have the standard firmware on your brick. And if you happen to have the 1.0x firmware on your brick and are using a recent release of NBC that you are passing -v=107 on the command line so that the compiler correctly targets the 1.0x firmware. Older versions of NBC defaulted to a 1.0x target version but the recent releases now default to using a version of 1.28 (-v=128).
If your program used arrays then another common cause for File Error messages is reading or writing past the end of an array, i.e., trying to access element n when there are only n elements in the array, since in C arrays are indexed from 0 to n-1 for an array with n elements.