Changed os.loadApi to require