added meaningful error reporting through logger