added error messages to reducer and transpose in case of wrong command line inputs