API functions to top
Remove pointless fs.exists()

From documentation: "fs.exists() is an anachronism and exists only
for historical reasons. There should almost never be a reason to
use it in your own code."
Cut embarrassingly long lines