Added url decoding, fixed cache and file locks