Improved output check