fix file existence test functions not using the argument in the thrown exception