fixes seg fault when file is added while watching directory