working on file lock

funtionality done - now writing tests