Save metrics to file in the receiver

Pull-Request to trigger code-review.