Added "output" to settings, instead of as a parameter + cleanup + creates folder if it does not exist