Implemented writting rvec and tvec to the file in different mode