Moving application env check into index file