Clear out media after every save
Fixed path generation for new files