diff --git a/acmc/phen.py b/acmc/phen.py
index 25ab3d448e88cb4123241ef3df2ead2dad9845dc..c232421089006f3681d2e2a49db8075efc810e61 100644
--- a/acmc/phen.py
+++ b/acmc/phen.py
@@ -404,10 +404,6 @@ def translate_codes(df, target_code_type):
 				# merge on corresponding codes and take target column
 				translated = pd.merge(col, df_map, how="left")[target_code_type]  
 				# TODO: BUG mask does not match column
-				# log_invalid_code(col,
-				# 				 ~translated.isna(),
-				# 				 code_type=col_name,
-				# 				 cause=f"Translation to {target}") #log codes with no translation
 				codes = pd.concat([codes, translated])  # merge to output
 			else:
 				logger.warning(f"No mapping from {col_name} to {target_code_type}, file {str(map_path.resolve())} does not exist")
@@ -419,10 +415,12 @@ def map_file(df, target_code_type, out, concepts, meta_columns=[]):
 	# seperate out meta_columns
 	metadata_df = df[meta_columns]
 	df = df.drop(columns=meta_columns)
+
+	# translate codes
 	codes = translate_codes(df, target_code_type)
 	codes = codes.dropna()  # delete NaNs
 	
-	# Append to out df
+	# Append to output if translated 
 	if len(codes) > 0:
 		codes = pd.DataFrame({"CONCEPT": codes})
 		codes = codes.join(metadata_df)
@@ -509,10 +507,14 @@ def map(phen_dir, target_code_type):
 										   out,
 										   concepts=file["concept_set_categories"][cat],
 										   meta_columns=meta_columns,)
+				else:
+					raise AttributeError(f"File {file} has either no concept_set or conceot_set_categories or the instance of dataframe objectives associated is incorrect, concept_set must be a DataFrame, conceot_set_categories must be pd.core.groupby.generic.DataFrameGroupBy")
+			else:
+				logger.warning(f"File {file} has no output after preprocessing in config {str(config_path.resolve())}")
 
 	# Check there is output from processing
 	if len(out.index) == 0:
-		raise Exception(f"No output after map processing, check configuration {str(config_path.resolve())}")
+		raise Exception(f"No output after map processing, check config {str(config_path.resolve())}")
 
 	# Final processing
 	out = out.reset_index(drop=True)