Check for sanity of inputs and outputs