renamed sortDirectory to sortFolder