Fixed missing argument to recursive scan_directory call
Print out exception on bulk writer error
Other fixes