add .maxFiles option to avoid excessive HTTP requests

closes #3