Added check to make sure output directory doesn't exist