Debug line only for '/api' calls
Fixed dumps argument in debug line
Some pep8 compliance