Added delay to wait for output file to exist