def updated_crontab
if read_crontab.index(comment_open) && !read_crontab.index(comment_close)
warn "[fail] Unclosed indentifier; Your crontab file contains '#{comment_open}', but no '#{comment_close}'"
exit(1)
elsif !read_crontab.index(comment_open) && read_crontab.index(comment_close)
warn "[fail] Unopened indentifier; Your crontab file contains '#{comment_close}', but no '#{comment_open}'"
exit(1)
end
if read_crontab.index(comment_open) && read_crontab.index(comment_close)
read_crontab.gsub(Regexp.new("#{comment_open}.+#{comment_close}", Regexp::MULTILINE), whenever_cron.chomp)
else
[read_crontab, whenever_cron].join("\n\n")
end
end