code to run bwa workflow and check if it was successful