Buckling versus folding: Importance of viscoelasticity