And to mention a trap - the unlock in there only works as such if you are not depending on data read from the file though. If you do, then you shouldn't explicity unlock the file - rather, process as quick as possible, close it and forget what you read. I don't know where it was, but
merlyn wrote a note or two to that effect here once upon a time.
Makeshifts last the longest.