adding return after logging error