Use the correct home path
Use only_if instead of if clause
Rubocop fixes