Merge "Log and return error if failed to listen to a socket"