Make sure log msgs get flushed immediately

This closes #35.