Can you check the permissions on this are correct?  The code removed above was making sure this was group-readable to foreman, yet owned by root.