Checking return status for the system functions & adding corresponding log messages.
Merge pull request #5 from abhims/master

Syslog for system call failures.