add read_command to capture all the output of a command; use read_command with curl to attempt to get better errors