added parameter for basedir and fixed two bugs with buzzer when time had run out