1. A method for controlling activity of a temporary file associated with a target file to which data is to be written in an object-oriented programming environment comprising the steps of: creating a file controller object within a user program; registering, with the file controller object, a file closing mode; creating a temporary file for writing data thereto from the user program; passing indicia of the temporary file, from the controller object to the user program; writing said data to the temporary file, using said indicia; and closing the temporary file, in the event of an error condition, in accordance with the file closing mode registered with the file controller object.