Removed fopen warning messages, fixed conversion warnings