Small refactoring
Removed touch\chmod error
Refactored and removed errors