Issue #1

Check  error after updating directory permissions.
Remove unused return.