file api restore
fix bug in fatal()