rand string getting written to img