Implmntd last used directory, fixed cancel crash