#6 - fixing option 2 bug (copy file)
#6 - small enhancement (using local var)