refactored files for single instance and thread execution status