bugfix : lock is not released correctly when the file is already preloaded