Rate limit checks and file output