Fix error occurred when scaffold folder doesn't exist