Modified code for checking created disk