Change print_error/ret to fail_with as per review