FileRepository: added method to get file by ID.