final version with file log and cron-ready management function
final version with file log and cron-ready management function