Added debugging error outputs