made sure the filename is unique for the directory it's being saved to