fix permissions
ensure buffer size isn't a problem