Add environment variable expansion to source, read and write