refactoring + improve error handling
improve logging + add logging config support
add *.swp to ignores