Logging to file, plus sync with jobman if available
Flatten labels in case of Nx1 matrix