Added checks for setuid / setgid
Fixed usage of __LINE__ macro