Remove while loop from log_call()