Fixed bug with extracting filename from url. Fixed bug wuth missing calls to methods opening up locks...