Remove exit and print added for debuggibg purpose