generating unique name for output file and adding href to it to the return result