fix error handling on chown