Updated checkIfEmpty, checkInGlobal, searchFile and work procedures.
Added queryDirectory and scanAllDirectory procedures.