Remove tabs and whitespaces.
Check network before keepAlive.