added error output in patients