change sql command
[Refactering]create function for fileManager