Fix some bugs

load_yaml needs a string, not a file handle

Change-Id: I8743ac1dfa3730cf53c329700888c014c86a68f7