Outputs error messages for out-of-range freq and duration as well as for empty string file name. This returns with status (1) for error cases.