added file guard