Tried to make POSIX compatiable
Fixed a bug in message fatal