Removed unsed variables

* unused variables in couple of functions
* replace File.exists? with File.exist? (deprecation)
it makes sense to remove commented code there