Fixes copy issue and adds file executable check