pileup: Detect non-recoverable errors and exit with proper status