Polished script, added input padding, length checking, lockfile
Fixed suppresed terminal bug