Multiple changes - implement LOCK, check common errors, remove obsolete files from CDN container

- check if we are the only running instance (implement LOCK);
- take care of common errors;
- clean the obsolete files from the CDN at specific time (user defined);