Replaced the if condition checking the parquet file with a simple
generic function.