Solved issue with file writing and added alignment length - % id plot