Ensure pwl is not None before checking if file exists
Fix test with non-existing pwl file