generate random password and save them in a text file