basic logging functionality and finally checked available departments error