Move writing the cache in try/except block so we don't have an error if http grab fails. Clean up fml function