DEBUG or sendmail(%mail) or warn "Error sending mail: $Mail::Sendmail::error\n";
}
-if ($tweets) {
+if (ref $tweets and keys %{$tweets}) {
# save last status to yaml file
DEBUG or YAML::Tiny::DumpFile("$Bin/status.yml", $stat);
DEBUG and warn "status.yml => ", Dumper($stat);