improved error handling and ADDs columns to input csv now