Removed unsed variables

* unused variables in couple of functions
* replace File.exists? with File.exist? (deprecation)