Solves two bugs: one in extract_tags and one in log_writer