Substitute env variables where needed