Fix a bug 

where the callback was invoked for as many times as the files count and not just once when all are loaded