Split logic for posix in download localpath variable

removed a bunch of print statements