More changes

Added a try/catch. Requested new permission, change wifi state