fixed open File bug; refactored code to separate setting sign and moving cursor
amended previous commit and fixed the bug an easier way