Move syslog initialization after closing all file descriptors and add some error messages about lock file

Fixes #6
Fix invalid exception handling
Merge pull request #8 from knsd/master

Move syslog initialization after closing all file descriptors and add some error messages about lock file