Modified to save the filename based on the slug filename