workaround for #4419
fix error information for stat syscall