add file exists check