Add logging
Save record_interval in config file
Modify some loggings
Add stay mode