changes to file API script