Attached please find =the reworked patch. 1) uses local() and closes connection 2) does not leave a variable cal;led file behind Cheers, Rainer