added sorted directory before loading the sequence  

linux system wont sort for you 
and added the isLoaded function body