Modified file to work with klshare environment variable