added file existence check
added lab6