Make number of tryies an option
If the number of tryies is reached and an exception is produced, then raise it
Made write a private method