Download plotly graphs to a folder

Unable to download the plots into a folder.
If i put the file name as iplot(fig, filename = “plots/new_plot”, image = “png”)

the image sometimes is blank and the name becomes plots_new_plot.png