inArray function + preloading assets
Fix bug files got appended too many times