Minor improvement to getFileData