write warnings to reason_failed
clean code
Merge pull request #15 from CERT-Polska/#13

marge #13 to develop