fixed script to use current working directory