Change cout to runtime_error