Next time please use `$fileList`, no more globals!
Your code should still work but I'll fix this for the sharing overview code.