added file locks