Fixed locked file problem