check for file param order
Fix CS errors and use correct exceptions
Add space after closures' function keyword
Merge pull request #4658 from bcrowe/3.0-closures-CS

3.0 - Add space after closures' function keyword