can’t output gray scaled image I’ve created using add_image_size

You have to add the metadata information with the new b&w thumbnail:

$meta['sizes']['thumbnail-bw'] = array(
  'width' => $meta['width'], 
  'height' => $meta['height'],
  'file' => $file
);

after generating the new image (after the switch block).

There ‘s also a plugin, called Grayscale, that does exactly what you need.