in reply to Angle operator

Perhaps an input file specified on your command line failed to open under your new script. You can easily verify this by intentionally specifying a file which does not exist and testing for exactly the same error. If so, try specifying the full path to the required file. This probably will not help, but it is so easy that it is worth a try.