fix small bug with checking if email should be sent on success
need to write repo file before rsync to container
because rsync from container will delete files on the lbs host