fixed possibility of hanging process on --remove and fixed an error in FSStorage.close