Added warning to readme and checked for undefined API in script