Question about error reporting

hi all,
i've got a script that takes in what a user enters (multiple entries) and then joins them all together and appends this to a file. what i want to happen now is the terminal should display "record saved" if the save to the file is successful, if it isn't just display the standard unix error message.

also in another script i am checking to see if some files actually exist that are needed in that script. i am using find to see if these files are there or not. it works fine, but say if the file i am looking for is not there and it's the third file that has been searched for, then the names of the two files that have already been found are printed out before the error message. is there a way to just pront out the error message?

cheers, waz.

append "&2 >/usr/error.log" at the end of the command, to log all the error messages to a file(/usr/error.log) and at the end of the execution use "cat /usr/error.log" to display only the system generated errors.

The problem with the find command is that it returns an error code of 0 if the search was successful ... and the search is successful whether or not the file is found.

What about, before you need the file, using something like:

if [ -e your_file ]; then
...
fi