I sounds as if you are doing things the right way. Regarless, your file appears to remain open and that is the reason for your -1 return value.
You may wish to perform a DISPLAY STATUS TO FILE
NOCONSOLE to verify the status of your file. Also, make sure that you issue an FCLOSE() whenever you are done using the file.