added string cast for getFileKeyFromKey