correcting error in lib_run to do with communicate()