Don't updated lastimg.png every time
Added flood protection and various security checks