creating temp file and check