remove unneccessary self
use Dir.exist? instead of deprecated Dir.exists?