automatically remove file widget when empty