updating scripts to support -f paramenter