Removed unused import
Use logging instead of warnings