Ah ok. I added the if to catch the error condition when stderrCapture threw an error and fileState was unpopulated. I changed the code to be more clear by removing this if statement, and returning once the error is validated within the test file. A call to stateEqual() would be invalid if an error is thrown. I hope that clear this up.