Extended log function for auto print errno value