changed if to check if file NOT exist