added err to PostTools.isMain