Made delete method proper

And Changed File.exists to File.isFile