Added 'with' statements and LED condition

-Now uses 'with' statement to ensure files are closed after use
-LED now illuminates if object is 404 because of server reset