model dir and scan key optional in loader