Added unlocking locked-file function