use File.exist? instead of File.exists?
remove unused variables
Merge pull request #2870 from hsbt/remove-warnings

Remove warnings