Close opened fid for m2t if errors
Exception compatible with Octave
Exception compatible with Octave (reverted from commit 17cf4dbdbd4acaac4fdbf35eb2bc0c185d4e67a5)
Close opened fid for m2t if errors (reverted from commit 81838fd1bac0f945050ddd976238c7974e23dd58)
Try catch only actual writing
Open file only before writing
Merge remote-tracking branch 'okomarov/fix_fcloseM2tFid' into develop