onlyif doesn't exist for files, fall back to less elegant solution