Regexp hardening, file fetching optimization