I agree with Michał, this is bad approach. One thing is logging, another is validating