Revert "MT#5715 use return instead of exit"

This reverts commit 31de5920724d41219313f48ad432a10a1d1a5310.