When this function is called, the file is alreay opened. so Ares.Workspace.files.length must be stored in a closure. Will that be easier to read ?