Code optimization, use API instead of direct DB query.
Fixed file permissions.