Fixed bug with usign arguments in bash command
fixing problems refactoring