better readFile helper for templates