Fix master_sheet bugs, add file metadata to spreadsheets