fix inferrer error handling and move suffix argument to chomp method for readability