trying to refine file manager's get-data function