Add check for existence of output folder