Sweep not working based on input curves

I have attached a Rhino screen-shot of the problem area. Essentially I have a set of curves constructed from points and I need to perform a sweep operation with that selected curves which will be acting as our rails or sections .
The error is occurring while I am inserting the rails as they sweep in a twisted manner .The arrow in the second image refers here the sweep is not working as required as it gets twisted or gets overlapped with side rail curve .
Kindly refer if I am missing some crucial step for that error for not to occur
Any Suggestions appreciated

Hi Shaikh, I changed the category to Grasshopper.

Do note that you will get quicker, more thorough responses by posting geometry (with grasshopper you can internalize any referenced Rhino geometry by Right Click>Internalize)