added if to file