File store reimplementation

why is this cast required here?