script was not working when it was started from another dir then the dir of the script