Have you tried to just restart your phone to see if that clears up your problem? Odd, one-off things like the flashlight stopping from working are often just caused by some random glitch. If you haven't already, at least try that before trying to fix a temporary problem.