Fix security issues in FileServer