Used error macro instead of exit.