update dependency
use File.exist? instead of File.exists?
fixed warnings: shadowing outer variables.