Added error handling for file_get_contents so that PHP doesn't leak the auth token when something goes wrong.