Refactored backup code to a single file, called through ARGV