Publication process improved, logging and cleanup fixed