added file exists method