with statement not there yet in jython 2.5, so replaced logging statements