functions for locking and releasing files, for working on the cluster
check whether files might be too big to combine