Actually this script used to use RCS for locking/logging, but we found out it was giving more problems than benefits... So now we're changing it to something simpler (read: not depending too much on other software), including our own type of (more descriptive) locking... We now keep a couple of versions of the file, which makes restoring problems quicker in our environment.
But thanks for the advice!