Modified to take path from command line. Use -f flag