made it wait for all files - CURRENTLY BROKEN