print environment + bugfix
add check for file existance