Move recent files handling to a database file