improve checkworkmail script