Add build folder cleanup on build errors and add option to keep it.